package gui.edit.listeners;

import gui.edit.components.dialogs.JDialogFillParam;

import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import tuio.components.SliderTouch;

/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class ListenerFillParamSliderInterpolationDownChange implements ChangeListener {

	private JDialogFillParam parent;

	public ListenerFillParamSliderInterpolationDownChange(JDialogFillParam parent){
		this.parent=parent;
	}

	@Override
	public void stateChanged(ChangeEvent e) {
		SliderTouch source = (SliderTouch) e.getSource();
		Integer sliderValue = source.getValue();
		parent.setInterpolationDownValue(sliderValue);
		parent.getBezierComponent().updateDownValue(sliderValue);
	}
}
